import axios from '../utils/http' // 导入http中创建的axios实例
import { Base64 } from '../utils/base'

let baseObj = new Base64()
const base_url = process.env.BASE_API
const inter_url = '/proxy/cam/proxy/common?api=';
const carApi = {

  // 单车列表
  getCarInfoList(params) {
    let url = 'CustomerSolicitFacade-getCarInfoList'
    return axios.post(`${base_url}${inter_url}${baseObj.encode(url)}`, params);
  },

  // 单车表详情查询接口
  getCarInfoBase(params) {
    let url = 'CustomerSolicitFacade-getCarInfoBase'
    return axios.post(`${base_url}${inter_url}${baseObj.encode(url)}`, params);
  },
     // 单车表新增接口
  addCustomerAndCarInfo(params) {
    let url = 'CustomerSolicitFacade-addCustomerAndCarInfo'
    return axios.post(`${base_url}${inter_url}${baseObj.encode(url)}`, params);
  },

  // 修改单车的送修人电话
  updateContactPhone(params) {
    let url = 'CustomerSolicitFacade-updateContactPhone'
    return axios.post(`${base_url}${inter_url}${baseObj.encode(url)}`, params);
  },

  // 修改单车的车主电话
  updateOwnerPhone(params) {
    let url = 'CustomerSolicitFacade-updateOwnerPhone'
    return axios.post(`${base_url}${inter_url}${baseObj.encode(url)}`, params);
  },

  // 修改单车的里程数据接口
  updateMiles(params) {
    let url = 'CustomerSolicitFacade-updateMiles'
    return axios.post(`${base_url}${inter_url}${baseObj.encode(url)}`, params);
  },

  // 变更单车的维修顾问接口
  updateSeverPsnAndFixCenter(params) {
    let url = 'CustomerSolicitFacade-updateSeverPsnAndFixCenter'
    return axios.post(`${base_url}${inter_url}${baseObj.encode(url)}`, params);
  },

// 维修履历
  getRepairworkorder(params) {
    let url = 'CustomerSolicitFacade-getRepairworkorder'
    return axios.post(`${base_url}${inter_url}${baseObj.encode(url)}`, params);
  },

  // 更新车牌号
  updateCarNo(params) {
    let url = 'CustomerSolicitFacade-updateCarNo'
    return axios.post(`${base_url}${inter_url}${baseObj.encode(url)}`, params);
  },
  // 里程记录
  getCarMilesRecord(params) {
    let url = 'CustomerSolicitFacade-getCarMilesRecord'
    return axios.post(`${base_url}${inter_url}${baseObj.encode(url)}`, params);
  },
  getCarAssociatedInfo(params) {
    let url = 'CustomerSolicitFacade-getCarAssociatedInfo'
    return axios.post(`${base_url}${inter_url}${baseObj.encode(url)}`, params);
  },
  getCarDrivingInfo(params) {
    let url = 'CustomerSolicitFacade-getCarDrivingInfo'
    return axios.post(`${base_url}${inter_url}${baseObj.encode(url)}`, params);
  },
  // 车辆保养记录新增接口
  carMaintainRecordAddNew(params) {
    let url = 'CustomerSolicitFacade-CarMaintainRecordAddNew'
    return axios.post(`${base_url}${inter_url}${baseObj.encode(url)}`, params);
  },
  getCustomerManagerByRepairId(params){
    let url = 'CustomerSolicitFacade-getCustomerManagerByRepairId'
    return axios.post(`${base_url}${inter_url}${baseObj.encode(url)}`, params);
  },
  queryCarInfoKhyy(params){
    let url = 'CustomerSolicitFacade-queryCarInfoKhyy'
    return axios.post(`${base_url}${inter_url}${baseObj.encode(url)}`, params);
  }
}

export default carApi;
